<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <!-- 避免IE使用兼容模式 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
    <meta name="renderer" content="webkit">
    <!-- TopJUI框架样式 -->
    <link type="text/css" href="../../topjui/themes/default/topjui.core.min.css" rel="stylesheet">
    <link type="text/css" href="../../topjui/themes/default/topjui.blue.css" rel="stylesheet" id="dynamicTheme"/>
    <!-- FontAwesome字体图标 -->
    <link type="text/css" href="../../static/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet"/>
    <!-- layui框架样式 -->
    <link type="text/css" href="../../static/plugins/layui/css/layui.css" rel="stylesheet"/>
    <!-- jQuery相关引用 -->
    <script type="text/javascript" src="../../static/plugins/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="../../static/plugins/jquery/jquery.cookie.js"></script>
    <!-- TopJUI框架配置 -->
    <script type="text/javascript" src="../../static/public/js/topjui.config.js"></script>
    <!-- TopJUI框架核心-->
    <script type="text/javascript" src="../../topjui/js/topjui.core.min.js"></script>
    <!-- TopJUI中文支持 -->
    <script type="text/javascript" src="../../topjui/js/locale/topjui.lang.zh_CN.js"></script>
    <!-- layui框架js -->
    <script type="text/javascript" src="../../static/plugins/layui/layui.js" charset="utf-8"></script>
</head>

<body>
<!-- layout布局 开始 -->
<div data-toggle="topjui-layout" data-options="fit:true">
    <div data-options="region:'center',title:'',fit:false,split:true,border:false,bodyCls:'border_right_bottom'"
         style="height:60%">
        <!-- datagrid表格 -->
        <table data-toggle="topjui-datagrid"
               data-options="id:'userDg',
                        rownumbers: true,
                        url:remoteHost+'/mdata/user/getPageSet',
                        onSelect:function(index,row){
                            //1. 给用户输入框赋值
                            $('#userName').iTextbox('setValue',row.userName+'('+row.userNameId+')');
                        }
			            ">
            <thead>
            <tr>
                <!--<th data-options="field:'uuid',title:'UUID',checkbox:true"></th>-->
                <th data-options="field:'userNameId',title:'员工号',sortable:true"></th>
                <th data-options="field:'userName',title:'姓名',sortable:true"></th>
                <th data-options="field:'sex',title:'性别',sortable:true,
                        formatter:function(value,row,index){
                            if (value == '1') {
                                return '男';
                            } else if (value == '2') {
                                return '女';
                            } else {
                                return '';
                            }
                        }"></th>
                <th data-options="field:'telephone',title:'电话',sortable:true"></th>
                <th data-options="field:'email',title:'电子邮箱',sortable:true"></th>
                <th data-options="field:'mobile',title:'手机',sortable:true"></th>
                <th data-options="field:'orgName',title:'所属机构',sortable:true"></th>
                <th data-options="field:'post',title:'职务',sortable:true"></th>
                <th data-options="field:'userGroup',title:'用户组',sortable:true"></th>
                <th data-options="field:'zone',title:'所属区域',sortable:true,hidden:true,formatter:function(value,row,index){return row.country+' '+row.province+' '+row.city+' '+row.district}"></th>
            </tr>
            </thead>
        </table>
    </div>
</div>
<!-- layout布局 结束 -->
<!-- 用户 表格工具栏 -->
<div id="userDg-toolbar" class="topjui-toolbar" style="height: 30px"
     data-options="grid:{
           type:'datagrid',
           id:'userDg'
       }">
    <form id="queryForm" class="search-box" >
        <input type="text" name="name" data-toggle="topjui-textbox"
               data-options="id:'name',prompt:'姓名',width:100">
        <input type="text" name="code" data-toggle="topjui-textbox"
               data-options="id:'code',prompt:'员工号',width:100">
        <a href="javascript:void(0)"
           data-toggle="topjui-menubutton"
           data-options="method:'query',
           iconCls:'fa fa-search',
           btnCls:'topjui-btn-blue',
           form:{id:'queryForm'},
           grid:{type:'datagrid','id':'userDg'}">查询</a>
    </form>

</div>


</body>
</html>
